package com.example.sunsg.okhttptest.retrofit;

import com.example.sunsg.okhttptest.roobo.RooboLoginReq;
import com.example.sunsg.okhttptest.roobo.RooboLoginRsp;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by NOTE-026 on 2016/8/4.
 */
public interface Ilogin {
     @GET("get_access_token")
     Call<Token> getAccessToken();

     @GET("get_access_token")
     Observable<Token> getAccessTokenObservece();
     @POST("login/")
     @FormUrlEncoded
     Call<LoginResultBean> login(@Field("username") String username,@Field("password") String password,@Field("sign") String sing);


     @GET("http://api.breadtrip.com/v2/new_trip/spot/")
     Call<SpotDetail> getSpotDetail(@Query("spot_id") String spot_id);

     @GET("http://api.breadtrip.com/v3/user/{userid}/")
     Call<UserInfo> getUserInfo(@Path("userid")String userid);

     @POST("/users/login")
     Call<RooboLoginRsp> rooboLogin(@Body RooboLoginReq req);

     @POST("/users/login")
     Observable<RooboLoginRsp> rooboLoginrxjava(@Body RooboLoginReq req);
}
